package com.cy.aircompressor.api;

import com.cy.aircompressor.entity.power.PowerStation;
import com.cy.aircompressor.entity.system.UserInfo;
import com.drug.lib.view.recycptr.bean.RowEntity;
import com.net.model.bean.BaseResponse;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface PowerStationApi {
    /**
     * 新增电站
     * {
     * "id": "string",
     * "name": "string",
     * "remark": "string"
     * }
     *
     * @param parameters
     * @return
     */
    @POST("powerStation/add")
    Flowable<BaseResponse<Object>> addPowerStation(@Body Object parameters);

    /**
     * 根据id删除电站信息
     *
     * @return Flowable
     */
    @POST("powerStation/deleteByIds")
    Flowable<BaseResponse<Object>> deleteByIds(@Body String[] ids);

    /**
     * 修改电站信息
     * {
     * "id": "string",
     * "name": "string",
     * "remark": "string"
     * }
     *
     * @param parameters
     * @return
     */
    @POST("powerStation/update")
    Flowable<BaseResponse<Object>> updatePowerStation(@Body Object parameters);

    /**
     * 分页查询电站信息
     *
     * @param pageNum
     * @param pageSize
     * @param name
     * @return
     */
    @GET("powerStation/queryPage")
    Flowable<BaseResponse<RowEntity<PowerStation>>> getPowerStationByPage(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize,
                                                                          @Query("name") String name);

    /**
     * 根据id查询电站信息
     *
     * @return Flowable
     */
    @GET("powerStation/queryById")
    Flowable<BaseResponse<PowerStation>> queryPowerStationById(@Query("id ") String id);
}
